package org.jupiter.blog.service.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.jupiter.blog.api.domain.JupiterArticleTag;

import java.util.List;

@Mapper
public interface JupiterArticleTagMapper {

	int insert(JupiterArticleTag tag);

	int updateByUuidSelective(JupiterArticleTag tag);

	JupiterArticleTag selectByUuid(@Param("uuid") String uuid);

	List<JupiterArticleTag> selectByArticleId(@Param("articleId") String articleId);

	List<JupiterArticleTag> selectByTagId(@Param("tagId") String tagId);

	int deleteByUuid(@Param("uuid") String uuid);

	int deleteByArticleId(@Param("articleId") String articleId);

	int deleteByTagId(@Param("tagId") String tagId);

	// ✅ 批量插入
	int insertBatch(@Param("list") List<JupiterArticleTag> tagList);

}
